'use strict'

//const pool = require('./a.js');
//const fun = require('./function.js');

class getjieqi {
  constructor() {
    this.param = '/'
  }

  async get(c) {
    let a = c.service.fun;
    let arr;
    c.setHeader('content-type', 'text/html; charset=utf-8')
    /*let data = pool.connect(function (err, client, done) {
      //let sell = a.sel('user_list', { "user_id": "userid66" }, ['user_name', 'user_head'], client);
      let sell = a.sel('user_list',{"user_id":"userid3"},['user_name','user_head'],client);
      //c.send('aaa')
      console.log(sell)
      //c.send({
      //  type:'arry',
      //  data:sell
      //})
      return sell;
    })*/
    //let data =await a.sel('user_list',{"user_id":"userid3"},["user_name","user_head"],c.service.pool);
    //c.send({
      //type:'array',
      //data:data.rows
    //})
    let data = await a.sel('jieqi_list','',[],c.service.pool);
    console.log(data.rows);
    c.send({
      type:'array',
      data:data.rows
    })
    //c.send('http://154.8.141.201:8080/static/image/dashu.png')
  }
}

module.exports = getjieqi;

